Script Manager Overview

A Script represents a typical session of a web application’s user interaction. It has a well-defined structure and keeps documentation of web application user actions. LoadTest executes a script to emulate a web user activity. A script can be executed several times during a test.

Concept of Virtual User and Session Count

Virtual User

Virtual users or Vusers are the conceptual users, which emulate human users interacting with an application executing a test script. A virtual user is the software simulation of a real-world user and a session represents what it does. Each group consists of several virtual users executing a test script.

Session Count

A session represents a sequence of page navigation by a user. Session count is the number of occurrences of sessions. It depends on the number of pages a user is accessing and a total number of users.

Fixed Session Rate and Fixed Concurrent User

Fixed Session Rate

Fixed Session Rate or FSR indicates that while running a scenario, the session rate is fixed.  Once a Vuser is removed from the system, the connection is closed. The user injects into the system as per the need. To achieve the session rate as defined in the scenario, users come into the system. Scenarios on FCUs are of the following types:

  • Simple Scenario Based
  • Simple Group Based
  • Advance Scenario Based
  • Advance Group Based

Fixed Concurrent User

Fixed Concurrent User or FCU indicates that while running a scenario, the number of users is fixed before the start of the test.  Scenarios on FCUs are of the following types:

  • Simple Scenario Based
  • Simple Group Based
  • Advance Scenario Based
  • Advance Group Based

Concept of Think Time

It is unrealistic for any real user to just keep clicking the pages one after the other without pausing to look at them. The user spends some time viewing the pages that are downloaded. The average viewing time depends upon the page contents & the user’s familiarity with the page. Each page may be assigned a think time. If a think time were not associated with a specific page, default page think time would be used for such pages. Page Think Time is also called Page View Time (after a page is downloaded).

Script Types

There are the following types of Scripts:

  • WebC (HTTP/HTML): This protocol is used to record scripts that are ‘C’ language syntax-based functions using LoadTest APIs. Users can use either LoadTest Browser or Internet Explorer/Mozilla Firefox for recording these scripts. These scripts are recorded as flow files per user session.
  • WebClickAndScript: This protocol is used to record scripts that are ‘C’ language syntax-based functions using LoadTest APIs. The default browser available for these types of scripts is LoadTest Browser. These scripts are also recorded as Flow files, which contain LoadTest APIs per user interaction with different input fields such as input, box, radio button, etc.
  • WebClickAndScript (JAVA): This protocol is used to record scripts that are ‘JAVA’ language syntax-based functions using LoadTest APIs. The default browser available for these types of scripts is LoadTest Browser. These scripts are also recorded as Flow files, which contain LoadTest APIs per user interaction with different input fields such as input, box, radio button, etc.
  • WebJava (HTTP/HTML): This protocol is used to record scripts that are ‘Java’ language syntax-based functions using LoadTest APIs. Users can use either LoadTest Browser or Internet Explorer/Mozilla Firefox for recording these scripts. These scripts are recorded as flow files per user session.
  • WebServices: This protocol is used to record scripts which are C language syntax-based functions using LoadTest APIs same as WebC protocol.
  • RDT (Real Device Testing)

Directory Structure

A Script consists of a list of directories – Dump Directory, and runlogic.c. A detailed description of the Script Manager Directory structure is provided below:

Dump Directory

It contains: –

  • Header file: It contains the request and response of each page.
  • list: It contains URLs of all the pages.
  • html
  • html

Temp Directory

It contains: –

  • txt: This file contains the URL whose names are parsed.
  • logs: This file contains Script Recorder_debug.log and log.

 

 

 

The script is divided into the following parts which we will discuss in detail in following chapters:

  • Script Manager
  • Script Recorder
  • Script Convertor
  • Run Jmeter Script
  • Create RDT Script
  • Launch Script Manager
Figure 1: Script Parts